﻿ @model SiteCredivale.ViewModels.usuarioViewModel

@{
   
    Layout = "~/Areas/Intranet/Views/Shared/_Layout.cshtml";
    
}

 <script src="/Scripts/jquery.alerts.js" type="text/javascript"></script>


 @using (Html.BeginForm(null, null, FormMethod.Post, new { @id = "form" }))
                    {
     
        
       <div class="box_small">
       <h3>Alteração de senha </h3>

      <br />
         @Html.ValidationSummary(true)
                        

                             <div class="editor-field">
                            <label class="txtLabel">
                               Senha antiga: </label>
                              @Html.PasswordFor(model => model.senha_antiga)<br />
                              @Html.ValidationMessageFor(model => model.senha_antiga)
                                        
                              </div>
                           @Html.HiddenFor(model => model.Login)
                                        
                         <div class="editor-field">
                            <label class="txtLabel">
                                Senha Nova: </label>
                          @Html.PasswordFor(model => model.senha)<br />
                              @Html.ValidationMessageFor(model => model.senha)
                        </div>

             <div class="editor-field">
                            <label class="txtLabel">
                               Repita a senha: </label>
                          @Html.PasswordFor(model => model.senha_novamente)<br />
                              @Html.ValidationMessageFor(model => model.senha_novamente)
                        </div>
                         <br />

                       <input id="enviar" type="submit" value="Salvar" class="btn" />
           </div>
     }

@if (ViewBag.res != null)
{
   if (ViewBag.res == "ok")    
   {  
   @Html.Raw("<script type='text/javascript'>showAlert('Aviso', '" + TempData["msg_retorno"].ToString() + "','sicoob')','Aviso');</script>")
                      
   }
   else
       {
  @Html.Raw("<script type='text/javascript'>jAlert('" + ViewBag.res + "','Aviso');</script>")
  }
 
}